package com.yywz.webservices;

import java.util.HashMap;
import java.util.Map;

import javax.jws.WebParam;
import javax.jws.WebService;

@WebService
public class Warehouse {
	
	private Map<String, Double> prices;
	
	public Warehouse() {
		prices = new HashMap<String, Double>();
		prices.put("Think in Java", 24.95);
		prices.put("Core Java ", 31.22);
	}
	
	public double getPrice(@WebParam(name="description") String description){
		Double price = prices.get(description);
		return price == null ? 0 : price;
	}
}
